package com.example.repository;


import com.example.entity.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.text.ParseException;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

//员工DAO

@Transactional
public interface EmployeeRepository extends JpaRepository<Employee,Integer> {
    //增加员工 save
    //查询全部员工信息 findAllByUserid
    List<Employee> findAllByUserId(Integer userId);

    //通过id查询员工
    Employee findEmployeeByIdAndUserId(Integer id,Integer userId);
    //删除员工信息
    void deleteByIdAndUserId(Integer id,Integer userId);
    //修改员工信息 save


}
